package org.lex.keytool.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPool {
	private static final ThreadPool INSTANCE = new ThreadPool();

	public static ThreadPool getInstance() {
		return INSTANCE;
	}

	public static void execute(Runnable run) {
		getInstance().getExecutor().execute(run);
	}

	public ExecutorService getExecutor() {
		return executor;
	}

	private ExecutorService executor = Executors.newCachedThreadPool();

	private ThreadPool() {
	}
}
